package com.apobates.forum.toro.template;

/**
 * 模板属性前缀句语
 * @author xiaofanku@live.cn
 * @since 2022-09-03
 */
public class TemplateAffixStatements {
    /**
     * 查询表达式集合
     * key = 目标对象的类名, value对象中属性的映射
     * 例: Members
     */
    private final String names;
    /**
     * 选择对象的哪个属性可以关联目标对象实例
     * 例: Orders.memberId
     */
    private final String joinAttr;
    /**
     * 聚合对像中哪个属性与joinAttr连接
     */
    private final String linkAttr;
    /**
     * 聚合对象的开头字符
     */
    private final String affix;

    public TemplateAffixStatements(String names, String joinAttr, String linkAttr, String affix) {
        this.names = names;
        this.joinAttr = joinAttr;
        this.linkAttr = linkAttr;
        this.affix = affix;
    }

    public String getNames() {
        return names;
    }

    public String getJoinAttr() {
        return joinAttr;
    }

    public String getLinkAttr() {
        return linkAttr;
    }

    public String getAffix() {
        return affix;
    }

    @Override
    public String toString() {
        return "TemplateAffixStatements{" +
                "names='" + names + '\'' +
                ", joinAttr='" + joinAttr + '\'' +
                ", linkAttr='" + linkAttr + '\'' +
                ", affix='" + affix + '\'' +
                '}';
    }
}
